package JAVASE525;

import java.util.ArrayList;

public class arraylistStudent {
    public static void main(String[] args) {
        ArrayList<studentbean> list = new ArrayList<>();
        studentbean s1 = new studentbean("zhangsan", 12);
        studentbean s2 = new studentbean("lisi", 13);
        studentbean s3 = new studentbean("wangwu", 25);
        list.add(s1);
        list.add(s2);
        list.add(s3);
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i).getName()+","+list.get(i).getAge());
        }

    }
}
